<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Canvas</title>
</head>

<body>
  <input id="color" type="color">
  <canvas id="canvas"></canvas>
</body>
<style>
  body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: grid;
    justify-content: center;
    align-content: center;
    justify-items: center;
    gap: 20px;
  }

  canvas {
    background-color: rgba(0, 0, 0, 0.3);
  }
</style>
<script src="./canvas4.js"></script>

</html>